from api.depart_api import DeparApi
from common.token_util import TokenUtil


class Departutil:
    # 封装一个获取部门id的方法
    @classmethod
    def get_departId(cls):
        token=TokenUtil.get_token()
        body= {"name": "测试01", "code": "123334"}
        resp=DeparApi.add_depart_api( token, body)
        depart_id=resp.json().get("data").get("id")
        return depart_id
if __name__ == '__main__':
    print(Departutil.get_departId())
